<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActiveScaffold::Actions::Show</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActiveScaffold::Actions::Show</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/active_scaffold/lib/actions/show_rb.html">
                vendor/plugins/active_scaffold/lib/actions/show.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000314">do_show</a>&nbsp;&nbsp;
      <a href="#M000312">included</a>&nbsp;&nbsp;
      <a href="#M000313">show</a>&nbsp;&nbsp;
      <a href="#M000315">show_authorized?</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000312" class="method-detail">
        <a name="M000312"></a>

        <div class="method-heading">
          <a href="#M000312" class="method-signature">
          <span class="method-name">included</span><span class="method-args">(base)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000312-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000312-source">
<pre>
   <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/show.rb, line 3</span>
3:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
4:       <span class="ruby-identifier">base</span>.<span class="ruby-identifier">before_filter</span> <span class="ruby-identifier">:show_authorized?</span>, <span class="ruby-identifier">:only</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:show</span>
5:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000313" class="method-detail">
        <a name="M000313"></a>

        <div class="method-heading">
          <a href="#M000313" class="method-signature">
          <span class="method-name">show</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000313-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000313-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/show.rb, line 7</span>
 7:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show</span>
 8:       <span class="ruby-identifier">do_show</span>
 9: 
10:       <span class="ruby-identifier">successful?</span>
11:       <span class="ruby-identifier">respond_to</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
12:         <span class="ruby-identifier">type</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'show'</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span> }
13:         <span class="ruby-identifier">type</span>.<span class="ruby-identifier">js</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">:partial</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'show'</span>, <span class="ruby-identifier">:layout</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span> }
14:         <span class="ruby-identifier">type</span>.<span class="ruby-identifier">xml</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">:xml</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">response_object</span>.<span class="ruby-identifier">to_xml</span>, <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">response_status</span> }
15:         <span class="ruby-identifier">type</span>.<span class="ruby-identifier">json</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">response_object</span>.<span class="ruby-identifier">to_json</span>, <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">JSON</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">response_status</span> }
16:         <span class="ruby-identifier">type</span>.<span class="ruby-identifier">yaml</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">response_object</span>.<span class="ruby-identifier">to_yaml</span>, <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Mime</span><span class="ruby-operator">::</span><span class="ruby-constant">YAML</span>, <span class="ruby-identifier">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">response_status</span> }
17:       <span class="ruby-keyword kw">end</span>
18:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000314" class="method-detail">
        <a name="M000314"></a>

        <div class="method-heading">
          <a href="#M000314" class="method-signature">
          <span class="method-name">do_show</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
A simple method to retrieve and prepare a record for showing. May be
overridden to customize <a href="Show.html#M000313">show</a> routine
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000314-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000314-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/show.rb, line 24</span>
24:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_show</span>
25:       <span class="ruby-ivar">@record</span> = <span class="ruby-identifier">find_if_allowed</span>(<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:id</span>], <span class="ruby-identifier">:read</span>)
26:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000315" class="method-detail">
        <a name="M000315"></a>

        <div class="method-heading">
          <a href="#M000315" class="method-signature">
          <span class="method-name">show_authorized?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The default security delegates to <a
href="../../ActiveRecordPermissions.html">ActiveRecordPermissions</a>. You
may override the method to customize.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000315-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000315-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/active_scaffold/lib/actions/show.rb, line 30</span>
30:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_authorized?</span>
31:       <span class="ruby-identifier">authorized_for?</span>(<span class="ruby-identifier">:action</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:read</span>)
32:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>